package com.zeei.bfs.vo;

import java.util.Comparator;

import com.zeei.common.vo.MenuVO;

public class MenuComparatorVO implements Comparator<MenuVO> {

	@Override
	public int compare(MenuVO menu1, MenuVO menu2) {
		Integer orderNum1 = menu1.getOrderNum();
		Integer orderNum2 = menu2.getOrderNum();
		if (orderNum1 == null) {
			return 0;
		}
		if (orderNum2 == null) {
			return 0;
		}
		return orderNum1 > orderNum2 ? 1 : -1;
	}

}
